#include "server.hpp"

int main()
{
    Socket client;
    client.CreateClient(8082, "127.0.0.1");
    std::string str = "yuanshuai haha";
    ssize_t ret = send(client.Fd(), str.c_str(), str.size(), MSG_DONTWAIT);
    char buf[64] = {0};
    ssize_t n = recv(client.Fd(), buf, 64, MSG_DONTWAIT);
    if(n <= 0)
    {
        if(errno == EINTR)
            return -1;
        ERR_LOG("ERRNO:%s", strerror(errno));
    }
    printf("%s\n", buf);
    while(1);
    return 0;
}